package demo1;

public class 浮点数 {


    public static void main(String[] args) {
        double num1 = 2.7;
        double num2 = 8.1/3;
        double num3 = 5.25;
        double num4 = 10.5/2;
        System.out.println(num1);//2.7
        System.out.println(num2);//2.6999999999999997
        System.out.println(num1==num2);//false
        System.out.println(num3);//5.25
        System.out.println(num4);//5.25
        System.out.println(num3==num4);//true



    }
}
